<!DOCTYPE html>
<html lang="en">
<#include "head.ftl"/>
<body>
    <!-- header -->
    <#include "header.ftl"/>
    <!-- Content -->
    <div class="content">
        <!--breadcrumb-->
        <#if breadcrumb?exists>
            <@breadcrumb/>
        <#else>
        </#if>
        
        <!-- 主体内容显示 -->
        <div class="container-fluid">
            <div class="row-fluid">
                
                <!-- 提示框,用于所有操作的提示 -->
                <div class="alert alert-info fade" style="display:none">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                    <strong>Just a quick note:</strong> Hope you like the theme!
                </div>
                
                <#if main?exists><@main/></#if>
                
            </div>
            
           
            
        </div>
        
    </div>
 	<!-- footer star -->
    	<footer>
       		<hr>
       		<p class="pull-right">Copyright &copy; 广大物流版权所有</p>
     	</footer>
	<!-- footer end -->
</body>
</html>

<script type="text/javascript">
    <#if jsscript?exists><@jsscript/></#if>
    
     $(function(){
    	$('#editPwd').click(function () {
		    $('#edit_password_dialog').dialog('open');
		});
    	$('#edit_password_dialog').dialog({
		    autoOpen: false,
		    width: 400,
		    buttons: {
		    	"Ok": function () {
		            
		            var validOk = $("#editpwdform").validate(
			  		{
					      /*自定义验证规则*/
				      	rules: {
				          	originalpassword: {required: true},
				          	password: {required: true},
				          	confirmpassword: { required: true, equalTo: "#password"} 
				      	},
					      /*错误提示位置*/
				      	errorPlacement: function(error, element) {
				          	error.appendTo(element.parent().siblings().children("span"));
				      	}
			      	}).form();
		            if(validOk == true){
        	      		$.ajax({
                			url : '${request.contextPath}/updatePassword.action', 
                			data:$("#editpwdform").serialize(),
                			type: 'POST',
                			dataType: 'json',
                			async:false,
                			timeout: 100000,
                			error: function(){alert('错误');},
                			success: function(result){
                				showMsg(result.message,result.result);
                				if(result.result == true){
                					$("#editpwdform")[0].reset();
                					$('#edit_password_dialog').dialog('close');
                				}
                				
                			}
                		});
                	}
		            
		            
		        },
		        "Cancel": function () {
		            $(this).dialog("close");
		        }
		    }
		});
});
</script>
    